CLASSES = bootloader/Main.class fs/FileProc.class keyboard/APDKeyListener.class \
		 keyboard/KeyRecorder.class screen/Screen.class screen/VRAM.class \
		 command/CommandExecutor.class language/LangEnv.class \
		 misc/Props.class \
		 apps/edit/Edit.class

ENTRYPOINT = bootloader.Main

default : compile

screen/%.class : screen/%.java
	javac screen/$*.java -encoding utf-8

fs/%.class : fs/%.java
	javac fs/$*.java -encoding utf-8

keyboard/%.class : keyboard/%.java
	javac keyboard/$*.java -encoding utf-8

bootloader/%.class : bootloader/%.java
	javac bootloader/$*.java -encoding utf-8

command/%.class : command/%.java
	javac command/$*.java -encoding utf-8

apps/edit/%.class : apps/edit/%.java
	javac apps/edit/$*.java -encoding utf-8

compile : $(CLASSES)

run : compile
	java $(ENTRYPOINT)

clean :
	del apps\edit\*.class
	del bootloader\*.class
	del command\*.class
	del fs\*.class
	del keyboard\*.class
	del language\*.class
	del misc\*.class
	del screen\*.class

pack : compile
	jar -cvmf manifest.txt airplandos-v1.0.jar .

run_pack : pack
	java -jar airplandos-v1.0.jar
